package com.ams.xfdbs.service.impl;

import org.springframework.stereotype.Service;
import com.ams.xfdbs.entity.User;
import com.ams.xfdbs.service.UserService;
import com.ams.xfdbs.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserRepository rep;

	@Override
	public User getOne(Integer id){
 		User one = rep.getOne(id);
		return one;
	}

	@Override
	public void deleteOne(Integer id){
 		rep.deleteById(id);
	}

	@Override
	public User saveOne(User entity){
 		User one = rep.save(entity);
		return one;
	}
}
